home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia 1995 April / Informatica Multimedia CD - Epimundo.iso / DOS / FILEFIND / BCHANGE.ZIP / BCHANGE.DOC < prev    next >
Encoding:
Text File  |  1989-02-26  |  11.4 KB  |  224 lines

  1. BCHANGE.EXE             (c)1989 DMA, P.O. Box 390, Mountlake Terrace, WA 98043
  2. Version 1.1
  3.  
  4.  
  5. WHAT IT IS
  6.  
  7. BCHANGE is designed to change a string of bytes in either a text or a binary
  8. file.  The data to be changed can be specified in either string or hexadecimal
  9. form.  A quick operational summary of BCHANGE can be displayed by typing
  10. BCHANGE at the DOS prompt.
  11.  
  12.  
  13. OPERATION
  14.  
  15. BCHANGE is invoked with the following command line:
  16.  
  17.     BCHANGE from_file to_file "from_string" "to_string" [/b] [/i]
  18.  
  19.             Field           Description
  20.  
  21.  
  22.             -------------   ---------------------------------------------------
  23.  
  24.  
  25.             from_file           This is the original file.  It may be qualified
  26.                             a drive, path name and extension if necessary.
  27.  
  28.  
  29.             to_file             This is the destination file.  It may also be
  30.                             qualified as necessary.  In addition, it may be
  31.                             the same file as from_file.  In this case, BCHANGE
  32.                             will write to a temporary file to do its
  33.                             processing.  When the program is done, BCHANGE
  34.                             will delete the original file and rename the
  35.                             temporary file.
  36.                                 If BCHANGE is interrupted before completing its
  37.                             task, the program will notify you of the name of
  38.                             the temporary file before terminating.
  39.                 
  40.  
  41.             "from_string"       This is the string for which you are searching.
  42.                             If you are operating in text mode (the default),
  43.                             this is the quoted string of characters for which
  44.                             you are searching, like this:
  45.                                 "This is bad text"
  46.                             These are the characters you want to remove from
  47.                             the file.  This search is case sensitive, and will
  48.                             catch only an exact match.
  49.                                 The quote marks are optional if there are no
  50.                             spaces embedded in the string.
  51.  
  52.  
  53.             "to_string"         This is the replacement string.  It is
  54.                             specified the same way the from_string is, with
  55.                             one exception: a null string ("") is allowed.
  56.                             A null string will simply delete all occurances of
  57.                             the from_string.
  58.  
  59.  
  60.             /b                  This switch specifies Binary Mode.  This means
  61.                             that both the from_string and the to_string must be
  62.                             specified as a series of hexadecimal numbers, in
  63.                             any of the formats shown:
  64.                                 "1, 05, A5, D2,FF"
  65.                                 ""  (null string, allowed for to_string only)
  66.                                 1,4,4b,DF,0F
  67.                                 "1, 4, 0d, 0 ,4 ,12, 14"
  68.                             The Binary Mode accepts leading zeros but does not
  69.                             require them.  Individual hex byte values must be
  70.                             separated by commas.  Any white space is optional.
  71.                             The following specification is, and has no commas
  72.                             separating the individual bytes:
  73.                                 "1 5 d2c"  ***INVALID***
  74.                             This one is OK, since there are only 2 real digits:
  75.                                 "1, 5, 2c"
  76.                             Note that if you have no whitespace between hex
  77.                             byte values, neither the from_string nor the
  78.                             to_string need be in quotes.  All of the following
  79.                             are just fine:
  80.                                 BCHANGE foo boo 1,2,ff,4 1,2,fe,4 /b
  81.                                 BCHANGE moo moo 0d,0a "" /b /i
  82.                             The first one does an automatic search and replace.
  83.                             The second one will effectively erase all CR/LF
  84.                             pairs in moo, prompting you before
  85.                             deleting each one.
  86.  
  87.  
  88.             /i                  This is the Interactive Mode switch.  Normally,
  89.                             BCHANGE will take your input and, as long as it's
  90.                             legal, do as well as it can.  If, for example, the
  91.                             from_file is not present, BCHANGE will dump out
  92.                             with a nonzero ERRORLEVEL.  But if the to_file
  93.                             already exists, BCHANGE will continue and just
  94.                             process the input file into a temporary file, then
  95.                             attempt to delete the existing to_file.  If it can,
  96.                             BCHANGE will then rename the temporary file to the
  97.                             name you specified as the to_file.  If it can't
  98.                             successfully do what you asked it to do, it will
  99.                             notify you by returning a nonzero ERRORLEVEL, and
  100.                             will tell how far it got and what file its output
  101.                             is in.
  102.                                 Interactive Mode is a little different.  First,
  103.                             it checks whether the to_file already exists (this
  104.                             will always be the case if you specify the same
  105.                             name for both the from_file and the to_file).  If
  106.                             the to_file does exist already, BCHANGE will check
  107.                             with you before proceeding.  The biggest difference
  108.                             is that Interactive Mode checks with you before
  109.                             making each replacement.  If possible, it shows you
  110.                             the 96 bytes preceding and following the change
  111.                             string in both hexadecimal and ASCII form, and then
  112.                             gives you an option every time it finds the
  113.                             from_string.  In these cases, you have three
  114.                             options, as follows:
  115.                                     Y   Yes.  This substitutes the to_string
  116.                                         for the from_string in the to_file.
  117.                                     N   No.  This allows the from_string to
  118.                                         pass unchanged into the to_file.
  119.                                     *   Yes forever.  This performs the same
  120.                                         substitution as 'Y', and also switches
  121.                                         you from Interactive to Normal mode.
  122.                                         You will be presented with no more
  123.                                         options.
  124.  
  125.  
  126. NOTES
  127.  
  128. ***Neither the file specifications (from_file and to_file) nor the options (/b
  129.         and /i) are case sensitive.
  130.  
  131. ***Note that BCHANGE does not alter a file in place, but makes a modified copy.
  132.         This is true even if the same name is specified for the from_file and
  133.         the to_file.  Therefore, if the from_string and the to_string are
  134.         different lengths, your file will change length and any internal
  135.         offsets may be invalidated.
  136.  
  137. ***Be careful when altering executable files.  You will almost always run into
  138.         trouble if you change the size or layout of an executable (.COM, .EXE,
  139.         .SYS, .OVL, etc.) file.  If you use BCHANGE on any executable file,
  140.         you should specify a to_string equal in length to the from_string.
  141.  
  142.  
  143. VERSION HISTORY
  144.  
  145.     1.0     Released January 25, 1989.
  146.     
  147.     1.1     Released January 26, 1989.  This version corrects two problems:
  148.             1)  An empty to_string was causing a null byte to be written to the
  149.                 file.  (Fixed)
  150.             2)  Documentation stated that commas were optional between hex byte
  151.                 values.  They are, in fact, mandatory. (Documentation changed)
  152.  
  153.  
  154. ASSISTANCE
  155.  
  156.     If you have trouble with BCHANGE, please contact me either through the
  157. mail, or send a message to me through CompuServe's EasyPlex mail service.  My
  158. mail and E-mail box numbers are listed below.  If you register, I will provide
  159. you with any necessary bug fixes.
  160.     If I am notified of any problems, I will post an updated version of BCHANGE
  161. on CompuServe.  The file name should be BCHGxx.ARC, where xx is the version
  162. number.
  163.  
  164.  
  165. SHAREWARE
  166.  
  167.     Well, here it is...the pitch.  I'll keep it short (see WHINE.ARC for
  168. further details).
  169.     This program took a lot of work to write.  If I kept it for my own use
  170. only, relatively little effort would have had to go into such things as error
  171. correction, documentation, etc.  I am busy enough that I could have used the
  172. time spent on such things in other ways.  But I felt that enough people could
  173. get some use from it that the extra time was justified.
  174.     I, and many like me, would like to be able to release useful utilities,
  175. tools and programs as shareware.  But the time it takes to properly prepare a
  176. program for distribution means that without some way to compensate the authors,
  177. some helpful programs never get out.  Maybe just the one you need?
  178.     So vote with your dollars.  Not many shareware authors are expecting to
  179. make a killing, so don't send us the titles to your cars and houses.  The fee
  180. for BCHANGE is $15.  If you register, please let me know what version of the
  181. program you have (1.1) so I can provide you with a new copy if necessary.
  182.  
  183.     Thanks...
  184.  
  185.         John Deurbrouck                             CSERVE 76530,371
  186.             DMA
  187.             Box 390
  188.             Mountlake Terrace, WA 98043
  189.  
  190.          ----------------end-of-author's-documentation---------------
  191.  
  192.                         Software Library Information:
  193.  
  194.                    This disk copy provided as a service of
  195.  
  196.                         The Public (Software) Library
  197.  
  198.          We are not the authors of this program, nor are we associated
  199.          with the author in any way other than as a distributor of the
  200.          program in accordance with the author's terms of distribution.
  201.  
  202.          Please direct shareware payments and specific questions about
  203.          this program to the author of the program, whose name appears
  204.          elsewhere in  this documentation. If you have trouble getting
  205.          in touch with the author,  we will do whatever we can to help
  206.          you with your questions. All programs have been tested and do
  207.          run.  To report problems,  please use the form that is in the
  208.          file PROBLEM.DOC on many of our disks or in other written for-
  209.          mat with screen printouts, if possible.  The P(s)L cannot de-
  210.          bug programs over the telephone.
  211.  
  212.          Disks in the P(s)L are updated monthly, so if you did not get
  213.          this disk  directly from the P(s)L,  you should be aware that
  214.          the files in this set may no  longer be the current versions.
  215.  
  216.          For a copy of the latest monthly software library newsletter
  217.          and a list of the 1,600+ disks in the library, call or write
  218.  
  219.                         The Public (Software) Library
  220.                               P.O.Box 35705 - F
  221.                            Houston, TX 77235-5705
  222.                                (713) 665-7017
  223.  
  224.